package base

/*
* @author: hjz
* @time: 2025/4/26 18:29
* @ 慢指针指向的位置是 0,遇到不为0直接移动
 */

func moveZeroes(nums []int) {
	slow := 0
	for i, num := range nums {
		if num != 0 {
			nums[slow], nums[i] = nums[i], nums[slow]
			slow++
		}
	}
}
